//
// Created by dddgzc on 2025/1/26.
//

#ifndef PEASHOOTERPLAYER_H
#define PEASHOOTERPLAYER_H
#include "Player.h"

extern std::vector<Bullet*> bullets;
extern Atlas* peashooterDieRightAtlas;
extern Atlas* peashooterDieLeftAtlas;
extern Atlas* peaShooterAttackExRightAtlas;
extern Atlas* peaShooterAttackExLeftAtlas;
extern Atlas* peaShooterRunRightAtlas;
extern Atlas* peaShooterRunLeftAtlas;
extern Atlas* peashooterIdleRightAtlas;
extern Atlas* peashooterIdleLeftAtlas;

class PeashooterPlayer : public Player {
public:
    PeashooterPlayer();
    ~PeashooterPlayer() = default;
private:
    void spawnPeaShooter(float speed);
    void onAttack() override;
    void onAttackEx() override;
    void onUpdate(int delta) override;
private:
    const float peaSpeed = 0.75f;
    const float peaExSpeed = 1.5f;
    const int attackExDuration = 2500; // 特殊攻击释放时间
private:
    MyTimer attackExTimer; // 特殊攻击状态定时器
    MyTimer spwanPeaExTimer; // 技能发射定时器
};



#endif //PEASHOOTERPLAYER_H
